package com.thz.houserental.infrastructure.table;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@TableName("log")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class LogRecord {

    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @Schema(description = "模块标题")
    private String title;

    @Schema(description = "操作类型")
    private String operator;

    @Schema(description = "操作者")
    private String businessType;

    @Schema(description = "方法名称")
    private String method;

    @Schema(description = "请求方法")
    private String requestMethod;

    @Schema(description = "请求url")
    private String requestUrl;

    @Schema(description = "请求ip")
    private String requestIp;

    @Schema(description = "请求参数")
    private String requestParam;

    @Schema(description = "返回参数")
    private String jsonResult;

    @Schema(description = "请求状态")
    private Integer status;

    @Schema(description = "错误信息")
    private String errorMsg;

    @TableField(fill = FieldFill.INSERT)
    private Date recordTime;
}
